hdc shell "hitrace -b 204800 -t 5 ability ace app ark binder disk freq idle irq memreclaim mmc multimodalinput ohos pagecache rpc sched sync window workq zaudio zcamera zimage zmedia -o /data/local/tmp/hitrace.ftrace"

if [ -z "$1" ]; then
    test_group=temp
else
    test_group=$1
fi

dst_fdr=~/Desktop/trace/$test_group
if [ ! -e "$dst_fdr" ]; then
    mkdir $dst_fdr
fi
echo $dst_fdr/${test_group}_$(date '+%m-%d_%H-%M-%S').ftrace

hdc file recv /data/local/tmp/hitrace.ftrace $dst_fdr/$1_$(date '+%m-%d_%H-%M-%S').ftrace
hdc shell rm -f /data/local/tmp/hitrace.ftrace
